package br.brpv.silvestrin.vendas.util;

import java.text.DecimalFormat;
import java.text.NumberFormat;

/**
 * User: paulo
 * Date: 10/7/12
 * Time: 10:49 AM
 */
public class FormatString {

    public static String formatValue(double value){
        NumberFormat f = NumberFormat.getInstance();
        if (f instanceof DecimalFormat) {
            ((DecimalFormat)f).applyPattern("#0.00");
        }

        return f.format(value).replace(',', '.');
    }
}
